package org.mebusw.struts.davincicode;

import java.io.Serializable;

public class PlayerState implements Serializable {
	public static final int WAITING = 0;
	public static final int TAKING = 1;
	public static final int GUESSING = 2;
	public static final int INSERTING = 3;
	public static final int GAMEOVER = 4;

	private int state;

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public String toString() {
		switch (state) {
		case WAITING:
			return "Waiting";
		case TAKING:
			return "Taking";
		case GUESSING:
			return "Guessing";
		case INSERTING:
			return "Inserting";
		case GAMEOVER:
			return "Game Over";			
		default:
			return "Unknown State";
		}
	}

}
